package com.tedu.weibo.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.*;

@Data
public class UserLoginDTO {
    @ApiModelProperty(value = "用户名",required = true,example = "张三")
    //@NotNull(message = "用户名不能为空")
    //@NotEmpty(message = "用户名不能为空")//包含NotNull，且不能为空串
    //@NotBlank(message = "用户名不能为空")//包含NotEmpty，且不能全是空格
    //@Size(min = 6,max = 20,message = "用户名必须在6-20个字符之间")
    @Pattern(regexp = "^[\\u4e00-\\u9fa5]{1,7}|[a-zA-Z0-9_]{6,14}$",message = "中文要求1-7个字符，英文要求6-14个字符")
    private String username;
    @ApiModelProperty(value = "密码",required = true,example = "123456")
    private String password;
}
